package com.example.SpringBootdemo;

import jakarta.servlet.http.HttpServletRequest;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@EnableAutoConfiguration
public class MsgPushController {
	private static final Logger logger = LogManager.getLogger();
	@RequestMapping("/push")
    public String push(HttpServletRequest request) {
		String username=request.getParameter("username");
        String password=request.getParameter("password");
        System.out.println("username is:"+username);
        System.out.println("password is:"+password);
        logger.info(username + password);
        return "Hello World" + username + password;
    }
	public static void main(String[] args) {
        SpringApplication.run(MsgPushController.class, args);
    }
}
